import http from "@/utils/http.js";


//定义请求登录接口的方法
export async function loginAPI(account, password) {
    return http.post('api/user/login', {}, {
        params: {
            userAccount: account,
            userPassword: password
        }
    });
}

export async function registerAPI(account, password, checkPassword) {
    return http.post('api/user/register', {}, {
        params: {
            account: account,
            password: password,
            checkPassword: checkPassword
        }
    });
}

export async function logoutApi() {
    return await http.get('/api/user/userLayout')
}


export async function updateInfoApi(user) {
    return http.post('api/user/updateInfo', user);
}


export async function feedBack(content) {
    return http.post('api/user/feedBack', {}, {
        params: {
            content: content
        }
    });
}
